<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增参赛其他材料提交')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-material-add">
            <div class="form-group">
                <label class="col-sm-3 control-label  is-required">大赛名称：</label>
                <div class="col-sm-8">
                    <select name="gameId" class="form-control" th:with="games=${@gameService.selectGameList(null)}" required>
                        <option th:each="game : ${games}" th:text="${game.name}" th:value="${game.id}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">学校：</label>
                <div class="col-sm-8">
                    <input name="school" class="form-control" type="text" th:value="${school?.deptName}" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">院系：</label>
                <div class="col-sm-8">
                    <input name="faculty" class="form-control" type="text" th:value="${faculty?.deptName}" readonly>
                </div>
            </div>
<!--            <div class="form-group">-->
<!--                <label class="col-sm-3 control-label">填报人：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="userName" class="form-control" type="text" th:value="${userName}" readonly>-->
<!--                </div>-->
<!--            </div>-->
            <div class="form-group">
                <label class="col-sm-3 control-label is-required" >材料详情：</label>
                <div class="col-sm-8">
                    <textarea name="description" class="form-control" rows="7" required placeholder="请输入存储了电子版作品、报名表、承诺书及学生证或校园一卡通的网盘链接（长期有效并附提取码）"></textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/material"
        $("#form-material-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-material-add').serialize());
            }
        }
    </script>
</body>
</html>
